package com.guoqiang.class_two.three;

public class MobileCard {
    //成员变量
    private String cardType;       //用于描述卡类型
    private String cardNumber;     //用于描述卡号
    private String userName;       //用于描述用户名
    private String password;       //用于描述密码
    private double accountBalance; //用于描述账户余额
    private int talkTime;       //用于描述通话时长
    private double netFlow;        //用于描述上网流量

    //无参构造方法
    public MobileCard() {
    }

    //有参构造方法
    public MobileCard(String cardType, String cardNumber, String userName, String password, double accountBalance, int talkTime, double netFlow) {
        setCardType(cardType);
        setCardNumber(cardNumber);
        setUserName(userName);
        setUserName(password);
        setAccountBalance(accountBalance);
        setTalkTime(talkTime);
        setNetFlow(netFlow);
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(double accountBalance) {
        this.accountBalance = accountBalance;
    }

    public double getTalkTime() {
        return talkTime;
    }

    public void setTalkTime(int talkTime) {
        this.talkTime = talkTime;
    }

    public double getNetFlow() {
        return netFlow;
    }

    public void setNetFlow(double netFlow) {
        this.netFlow = netFlow;
    }

    //自定义成员方法
    public void show(){
        System.out.println("卡号：" + getCardNumber());
        System.out.println( "用户名：" + getUserName() );
        System.out.println("当前余额：" + getAccountBalance());
    }
}
